1. Field of the Invention
The present patent application is closely related to U.S. patent application Ser. No. 266,429 which is a parent application of Ser. No. 647,271, now U.S. Pat. No. 4,661,903 and U.S. Ser. No. 266,424, which is a parent application of Ser. No. 580,772, now abandoned both filed on even date with the present application and assigned to the assignee of the present application.
The present invention relates generally to digital computer systems and more specifically co systems for representing data by means of operands and obtaining the address of the represented data from the operands.
2. Description of Prior Art
A recurring problem in the design of digital computer systems is the manner in which data to be processed by the computer system is to be represented in the instructions to which the processor responds. In order to process an item of data, the processor requires at a minimum the address of the item. However, it is generally impractical to simply include the address in the instruction. First, the locations of many items of data are not known until a program is actually executed, and consequently, cannot be included in the program's instructions. Second, when the address is included in the instruction, the instruction will operate correctly only in a single addressing environment. Such a restriction bars the sharing of programs by different users and further bars the use of procedures which may be called at various points in a program.
In the prior art, the above problems have been overcome by techniques such as base-displacement addressing and descriptions. In base-displacement addressing, utilized for example in the IBM 360-370 family of digital computer systems, the processor contains one or more base registers. Certain instructions permit the programmer to load the base registers with addresses obtained from memory or computed in the processor. Addresses of data may then be represented in instructions by specifying one of the base registers and a displacement from whatever address is currently stored in the base register. The address of the data is obtained by adding the specified displacement to the current value of the specified base register. Since the base registers may be set during execution of a program, addresses which are not known until the program is executed may be calculated by first setting a base register to the proper value and then specifying a displacement relative to the base address. Further, since the base registers may be set to different values for different executions of a program, programs are independent of a specific addressing environment.
Base-displacement addressing is not well-suited to dealing with data items whose addresses are determined by complex computations dependent on values which are not known until the program is executed. For example, the address of an array element is found by obtaining an index value from memory, multiplying the size of an element in the array by the index value, and adding the result to the address of the beginning of the array. In base-displacement addressing, sequences of instructions specifying these computations and setting the base registers to the proper values must be executed each time a program processes an element of an array. Consequently, programs dealing with data such as array elements are much longer than those dealing with data requiring less-complex address computations.
Descriptions, as implemented in the Burroughs B1700 processor and disclosed in U.S. Pat. No. 3,805,247, Zucker, et al., Apr. 16, 1974, entitled Description Driven Microprogrammable Multiprocessor System, solve the above-cited problems of base-displacement addressing schemes when complex address computations are required. In the system disclosed in Zucker et al., data items are represented in instructions by specifying a name register and a description address. Descriptions are data in memory which are associated with a specific execution of a program and which are used to calculate the addresses for that execution of the program. Where complex calculations are required, one description may refer to another. The name register specified in the instruction contains data allowing the specific location of a data item in an area specified by the description located by the description address. The address of the represented data item is computed using the information in the description specified in the instruction, descriptions referred to through that description, and the information in the name register specified in the instruction. Since one description may refer to another, no more instructions are needed in programs involving data items requiring complex address computations than in those requiring only simple address computations. Further, while instructions for complex address computations must be repeated each time the address computation is performed, a given description may be used to calculate addresses for many different instructions.
There are two disadvantages to descriptions: first, they must be created anew each time a program is executed; second, they contain memory management and protection information which is subject to change while a program is being executed; consequently, even though the address of a data item may remain the same throughout the execution of the program, the address cannot be easily encached.
The present invention provides data processing system improvements and features which solve the above-described problems and limitations.